import React, { memo } from 'react'
import { useState } from 'react'

export default memo(function App() {
  const [message, setMessage] = useState('hello world')

  function changeMessage() {
    setMessage('123')
  }

  return (
    <div>
      <h2>App message: {message}</h2>
      <button onClick={changeMessage}>修改文本</button>
    </div>
  )
})
